# 倒入必须的包
from langchain_community.document_loaders import PyPDFLoader


# 定义chatdoc
class ChatDoc():
    @staticmethod
    def getFile():
        try:
            # 读取文件
            loader = PyPDFLoader("../kecheng源码/example/fake.pdf")
            text = loader.load()
            return text;
        except Exception as e:
            print(f"Error loading files:{e}")


print(ChatDoc.getFile())
